
#if defined _partymod_included
	#endinput
#endif
#define _partymod_included

#if !defined _partymod_core
	#pragma reqlib "partymod"
#endif

#if !defined MAX_PLAYERS
	#define MAX_PLAYERS 32
#endif

enum{
	PINFO_CONNECT,
	PINFO_STATUS,
	PINFO_TEAM,
	PINFO_SOLID,
	PINFO_SPEED,
	PINFO_HEALTH,
	PINFO_LIVES,
	PINFO_MAX
}

enum{
	FORW_INIT = 1,
	FORW_PLAYER_SPAWN = 2,
	FORW_START = 4,
	FORW_PLAYER_DEATH = 8,
	FORW_END = 16
}

enum{
	TEAM_FFA = 1,
	TEAM_EVEN = 2,
	TEAM_ONEvALL = 4
}

enum PLAYER_SELECT
{
	PLAYER_NONE =       0,
	PLAYER_ALIVE =      P_FLAG_A,
	PLAYER_DEAD =       P_FLAG_B,
	PLAYER_REAL =       P_FLAG_C,
	PLAYER_BOT =        P_FLAG_D,
	PLAYER_INTEAM =     P_FLAG_E,
	PLAYER_GOD =        P_FLAG_F,
	PLAYER_MORTAL =     P_FLAG_G,
	PLAYER_NOHLTV =     P_FLAG_H,
	PLAYER_NOTEAM =     P_FLAG_I
}

stock const entity_death[] = "party_death";
stock const entity_temp[] = "party_temp";
stock const entity_point[] = "party_point";

#define SECONDS_TO_SCREENFADE_UNITS(%1) floatround(float((1<<12)) * (%1))

stock const TeamColors[16][3] = {
	{255,0,0},		//red
	{0,255,0},		//green
	{0,0,255},		//blue
	{255,255,0},	//yellow
	{148,0,211},	//purple
	{255,140,0},	//orange
	{0,255,255},	//cyan
	{250,128,114},	//salmon
	{127,255,0},	//lime green
	{139,69,19},	//brown
	{184,134,11},	//gold
	{255,105,180},	//pink
	{0,100,0},		//dark green
	{135,206,250},	//sky blue
	{255,255,255},	//white
	{128,128,128}	//Grey
}
stock const TeamNames[16][] = {
	"Red",		//red
	"Green",	//green
	"Blue",		//blue
	"Yellow",	//yellow
	"Purple",	//purple
	"Orange",	//orange
	"Cyan",		//cyan
	"Salmon",	//salmon
	"Lime",		//lime green
	"Brown",	//brown
	"Gold",		//gold
	"Pink",		//pink
	"Forest",	//dark green
	"Sky",		//sky blue
	"White",	//white
	"Grey"		//Grey
}

native PartyPlayerRespawn(id);
native PartyPlayerKill(id);

native PartyPlayerInfo(id, pinfo);
native PartyPlayerSetInfo(id, pinfo, newinfo);

native PartyPlayerWin(id);
native PartyPlayerLose(id);

native PartyTeamWin(id);
native PartyTeamLose(id);

native RegisterGame( Name[], Areas[][], Forws, Teams );

forward PartyInit();

forward GameInit(gameid);
forward GameStart(gameid);
forward GameEnd(gameid);

forward GamePlayerSpawn(gameid, id);
forward GamePlayerDeath(gameid, id);
